Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stimulus): don't require an optional dependency if it's not used #863

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

Kocal
Copy link
Contributor

@Kocal Kocal commented Dec 3, 2020

Fix #861

Testing my modification on a new Symfony repository but removing @symfony/stimulus-bridge and stimulus dependencies.

If you try to use .useStimulusBridge() without those depdendencies installed, you now have this friendly error message:

image

When you install the dependencies, everything is okay:
image

When you don't use .useStimulusBridge() and don't have installed Stimulus dependencies, you have no errors anymore about those missing deps, since they are not required.
Here, the errors are coming from the app code (from the Symfony recipe) I didn't have update, but it's fine:
image

cc @fabpot @weaverryan

@Kocal
Copy link
Contributor Author

Kocal commented Dec 3, 2020

(rebased)

@weaverryan
Copy link
Member

Thank you @Kocal!

@weaverryan weaverryan merged commit 2ea1d2f into symfony:main Dec 3, 2020
@Kocal Kocal deleted the GH-861 branch December 3, 2020 12:39
@tgalopin
Copy link
Contributor

tgalopin commented Dec 3, 2020

Thanks @Kocal, amazing you've been so quick!

@Kocal
Copy link
Contributor Author

Kocal commented Dec 3, 2020

Thanks to you 😳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release 0.32.0 breaks with Error: Cannot find module '@symfony/stimulus-bridge/webpack-helper'
3 participants